<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>签到结果</title>
</head>
<script type='text/javascript' src='js/prototype.js'></script>
<script type='text/javascript' src='js/sha1.js'></script>
<script type='text/javascript' src='js/public.js'></script>
<script type="text/javascript">

function showcheck(){

	var request = {
			QueryString : function(val) {
				var uri = window.location.search;
				var re = new RegExp("" + val + "=([^&?]*)", "ig");
				return ((uri.match(re)) ? (uri.match(re)[0]
						.substr(val.length + 1)) : null);
			}
		};
    var lectureId = request.QueryString("lectureId");
	var params = "lectureId=" + encodeURIComponent(lectureId);

	new Ajax.Request("json/showCheckResult", {
		method : "post",
		parameters : params,
		onComplete : function(request) {
		
			var res = request.responseText.evalJSON();
			var start="<table width='500' border='1' style='border: 1px solid;  border-collapse:collapse;  text-align: center;margin-left:100px'><tr><td>学号</td><td>姓名</td><td>专业</td><td>班级</td><td>年级</td></tr>";
			 var stop="</table>";
			 var cont="";
			for (var i = 0; res["result"]["id" + i] != null; i++) {
				var tmp = "<tr><td>"+res["result"]["userId" + i]
				+"</td><td>"+res["result"]["userName" + i]+"</td><td>"+res["result"]["major" + i]+"</td><td>"+res["result"]["userclass" + i]+"</td><td>"+res["result"]["enterYear" + i]+"</td></tr>";
				cont += tmp;}
			     cont=start+cont+stop;
				$("show").innerHTML += cont;
		
		
		},
		asynchronous : false
	});
}
</script>
<body onload="showcheck()">
<div style="width:1100px;font-size:18px; text-align: left;" id="show">

</div>

</body>
</html>